package net.dfrz.oa.pojo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * 人员调动类
 * @author vovh
 *
 */
@Entity
@Table(name="t_transfer")
public class Transfer implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Integer id;
	private String beforedept;
	private String nowdept;
	private Date date;//调动时间
	private User user;//1-1  userId(存在更新，不存在保存)
	@GeneratedValue
	@Column(name="id")
	@Id
	public Integer getId() {
		return id;
	}
	public void setId(Integer id) {
		this.id = id;
	}
	public String getBeforedept() {
		return beforedept;
	}
	public void setBeforedept(String beforedept) {
		this.beforedept = beforedept;
	}
	public String getNowdept() {
		return nowdept;
	}
	public void setNowdept(String nowdept) {
		this.nowdept = nowdept;
	}
	@Temporal(TemporalType.DATE)
	public Date getDate() {
		return date;
	}
	public void setDate(Date date) {
		this.date = date;
	}
	@JoinColumn(name="userId",unique=true)
	@OneToOne
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	
}
